package org.syx.edl.validate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author:whh
 * @date: 2025-09-05 22:31
 * <p></p>
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = {FixDecimalValidator.class}
)
public @interface FixDecimal {

    String message() default "小数精度必须为{scale}位";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    int scale() default 0;
}
